/*插件式定时器任务
Created on 2020年05月10日
@author: zxyong 13738196011
 */

package com.zxy.tcp;

import com.zxy.common.ParamName_InterFace;

public class CustTimeTask extends java.util.TimerTask
{
	public boolean	bTimeFlag			= true;
	public String	REFLECT_IN_CLASS	= "";

	@Override
	public void run()
	{
		if(bTimeFlag == true)
		{
			bTimeFlag = false;
			// 接口输入反射类调用
			if(!REFLECT_IN_CLASS.equals(""))
			{
				try
				{
					Class<?> objC = Class.forName(REFLECT_IN_CLASS);
					ParamName_InterFace pni = (ParamName_InterFace)objC.newInstance();
					pni.init_start();
				}
				catch(Exception ee)
				{
					System.err.println(REFLECT_IN_CLASS + "自定义定时器拦截器执行函数失败!" + ee.getMessage());
				}
			}
			bTimeFlag = true;
		}
	}
}
